import request from '@/utils/request'

// 查询月薪计算规则列表
export function listSalaryrule(query) {
  return request({
    url: '/business/salaryrule/list',
    method: 'get',
    params: query
  })
}

// 查询月薪计算规则详细
export function getSalaryrule(id) {
  return request({
    url: '/business/salaryrule/' + id,
    method: 'get'
  })
}

// 新增月薪计算规则
export function addSalaryrule(data) {
  return request({
    url: '/business/salaryrule',
    method: 'post',
    data: data
  })
}

// 修改月薪计算规则
export function updateSalaryrule(data) {
  return request({
    url: '/business/salaryrule',
    method: 'put',
    data: data
  })
}

// 删除月薪计算规则
export function delSalaryrule(id) {
  return request({
    url: '/business/salaryrule/' + id,
    method: 'delete'
  })
}

// 导出月薪计算规则
export function exportSalaryrule(query) {
  return request({
    url: '/business/salaryrule/export',
    method: 'get',
    params: query
  })
}